home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 11: TSX-11 / Linux Cubed Series 11 - TSX-11 Vol 1.iso / sbin / bootutil.1 / bootutil / bootutils / mount / sundries.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-01  |  1.7 KB  |  75 lines

  1. /* $Header: /usr/src/mount/RCS/sundries.h,v 1.1 1992/09/06 13:30:53 root Exp root $ */
  2.  
  3.  
  4. #include <sys/types.h>
  5. #include <sys/mount.h>
  6. #include <sys/stat.h>
  7. #include <stdio.h>
  8. #include <errno.h>
  9. #include <fcntl.h>
  10. #include <getopt.h>
  11. #include <limits.h>
  12. #include <mntent.h>
  13. #include <signal.h>
  14. #include <stdarg.h>
  15. #include <stdlib.h>
  16. #include <string.h>
  17. #include <unistd.h>
  18.  
  19. #include "fstab.h"
  20.  
  21.  
  22. #define streq(s, t)    (strcmp ((s), (t)) == 0)
  23.  
  24.  
  25. #define MOUNTED_LOCK    "/etc/mtab~"
  26. #define _PATH_FSTAB    "/etc/fstab"
  27. #define LOCK_BUSY    3
  28.  
  29. /* File pointer for /etc/mtab.  */
  30. extern FILE *F_mtab;
  31.  
  32. /* File pointer for lock.  */
  33. extern FILE *F_lock;
  34.  
  35. /* String list data structure.  */ 
  36. typedef struct string_list
  37. {
  38.   char *hd;
  39.   struct string_list *tl;
  40. } *string_list;
  41.  
  42. #define car(p) ((p) -> hd)
  43. #define cdr(p) ((p) -> tl)
  44.  
  45. string_list cons (char * const a, const string_list);
  46.  
  47. /* Quiet compilation with -Wmissing-prototypes.  */
  48. int main (int argc, char **argv);
  49.  
  50. /* From mount_call.c.  */
  51. int mount5 (const char *, const char *, const char *, int, void *);
  52.  
  53. /* Functions in sundries.c that are used in mount.c and umount.c  */ 
  54. void block_signals (int how);
  55. char *canonicalize (const char *path);
  56. void close_mtab (void);
  57. void volatile die (int errcode, const char *fmt, ...);
  58. void error (const char *fmt, ...);
  59. void lock_mtab (void);
  60. int matching_type (const char *type, string_list types);
  61. void open_mtab (const char *mode);
  62. string_list parse_types (char *types);
  63. void unlock_mtab (void);
  64. void *xmalloc (size_t size);
  65. char *xstrdup (const char *s);
  66.  
  67. #ifdef HAVE_NFS
  68. int nfsmount (const char *spec, const char *node, int *flags,
  69.           char **orig_opts, char **opt_args);
  70. #endif
  71.  
  72. #define mount5(special, dir, type, flags, data) \
  73.   mount (special, dir, type, 0xC0ED0000 | (flags), data)
  74.  
  75.